package MyDisplayObjects
{
	import flash.events.Event;
	
	/** This custom event is being used because it needs to bubble up so that higher level objects can respond to a click on 
	 * the button.  The name of the button is also supplied */
	public class ClickableMCEvent extends Event
	{
		public static const CLICKED:String = "clicked";
		
		private var _name:String;
		public function get name():String{return _name;}
		
		public function ClickableMCEvent(type:String, name:String, bubbles:Boolean=true, cancelable:Boolean=true)
		{
			super(type, bubbles, cancelable);
			this._name = name;
		}
		
		override public function clone():Event 
		{
			// Return a new instance of this event with the same parameters.
			return new ClickableMCEvent(type, name, bubbles, cancelable);
		}
	}
}